<template>
    <a-table :columns="columns" :data-source="list" :pagination="false">
        <!-- 表头信息 -->
        <template #headerCell="{ column }" style="color:black">
            <template v-if="column.key === 'id'">
                <span>
                    序号
                </span>
            </template>

        </template>

        <template #bodyCell="{ column, record }">
            <template v-if="column.key === 'zt'">
                <a style="color:aquamarine">
                    {{ record.zt }}
                </a>
            </template>
            <template v-if="column.key === 'type'">
                <a style="color:blueviolet">
                    {{ record.type }}
                </a>
            </template>
            <template v-else-if="column.key === 'caozuo'">
                <span>
                    <a style="color:blue">{{ record.caozuo }}</a>
                </span>
            </template>
        </template>
    </a-table>
</template>
<script>
import { DownOutlined } from '@ant-design/icons-vue';
import { defineComponent } from 'vue';
const columns = [
    {
        id: '序号',
        dataIndex: 'id',//dataIndex主键
        key: 'id',
    }, {
        title: '订单状态',
        dataIndex: 'zt',
        key: 'zt',
    }, {
        title: '订单类型',
        dataIndex: 'type',
        key: 'type',
    }, {
        title: '订单编号',
        dataIndex: 'address',
        key: 'address',
    }, {
        title: '姓名',
        key: 'tags',
        dataIndex: 'tags',
    }, {
        title: '科室',
        key: 'action',
        dataIndex: 'action',
    }, {
        title: '接诊医生',
        dataIndex: 'doctor',
        key: 'doctor',
    }, {
        title: '优惠(元)',
        dataIndex: 'youhui',
        key: 'youhui',
    }, {
        title: '应收/退(元)',
        dataIndex: 'yingshou',
        key: 'yingshou',
    }, {
        title: '实收/退(元)',
        dataIndex: 'shishou',
        key: 'shishou',
    }, {
        title: '医保(元)',
        dataIndex: 'yibao',
        key: 'yibao',
    }, {
        title: '会员卡',
        dataIndex: 'huiyuan',
        key: 'huiyuan',
    }, {
        title: '现金(元)',
        dataIndex: 'xianj',
        key: 'xianj',
    }, {
        title: '支付宝(元)',
        dataIndex: 'zhifub',
        key: 'zhifub',
    }, {
        title: '微信(元)',
        dataIndex: 'wx',
        key: 'wx',
    }, {
        title: '银行卡(元)',
        dataIndex: 'yhk',
        key: 'yhk',
    }, {
        title: '收费日期',
        dataIndex: 'sfrq',
        key: 'sfrq',
    }, {
        title: '收费员',
        dataIndex: 'sfy',
        key: 'sfy',
    }, {
        title: '操作',
        dataIndex: 'caozuo',
        key: 'caozuo',
    }
];
const data = [{
    key: '1',
    id: 1,
    zt: '已收费',
    type: '处方开立',
    address: 100130,
    tags: '周全',
    action: '全科',
    doctor: '王冕',
    youhui: 210,
    yingshou: 10,
    shishou: 200,
    yibao: 50,
    huiyuan: 150,
    xianj: 0,
    zhifub: 0,
    wx: 0,
    yhk: 0,
    sfrq: 0,
    sfy: '王丽',
    caozuo: '查看详情',
}];
export default defineComponent({
    components: {
        DownOutlined,
    },
    props: ['list'],//接收父组件传过来的数据
    setup() {
        return {
            data,
            columns,
        };
    },
});
</script>
<style scoped></style>